package com.yiqi.lottery.feature.home.view;

import android.annotation.SuppressLint;
import android.content.Intent;
import com.suozhang.framework.framework.BaseActivity;
import com.suozhang.framework.utils.logger.Logger;
import com.yiqi.lottery.R;
import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;

import java.util.concurrent.TimeUnit;


public class SplashActivity extends BaseActivity {


    @Override
    protected int attachLayoutRes() {
        return R.layout.activity_splash;
    }

    @Override
    protected void initInjector() {

    }

    @Override
    protected void initSystemParams() {
//        super.initSystemParams();

    }

    @SuppressLint("CheckResult")
    @Override
    protected void initData() {
        onCodeClick();
    }

    public void onCodeClick() {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(2000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                startActivity(new Intent(SplashActivity.this, MainActivity.class));
            }
        }).start();
    }

}
